import * as THREE from 'three';

// 创建一个空的几何体对象
const geometry = new THREE.BufferGeometry();

const vertices = new Float32Array([
    -300, 0, 300,
    -250, 0, 300,
    -200, 0, 300,
    -150, 0, 300,
    -100, 0, 300,
    -50, 0, 300,
    0, 0, 300,
])

// 使用缓存对象表示顶点数据
const attribute = new THREE.BufferAttribute(vertices, 3);

// 设置几何体的顶点位置属性
geometry.attributes.position = attribute;

// 定义点材质
const material = new THREE.PointsMaterial({
    color: 0xffff00,
    size: 10,
})

// 定义点模型对象
const points = new THREE.Points(geometry, material);

export default points;